package com.example.exercise.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;
import org.springframework.stereotype.Component;

/**
 * 初始化里放这个，new Scheduler().getListenerManager().addJobListener(listener,list);
 * 可以将任务队列放redis里，有空闲队列是取出来startQuart，如果没有被执行就轮询startQuart
 */
@Component
public class MyJobListener implements JobListener {
    @Override
    public String getName() {
        return null;
    }

    @Override
    public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {

    }

    @Override
    public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {

    }

    //完成job以后执行监听
    @Override
    public void jobWasExecuted(JobExecutionContext jobExecutionContext, JobExecutionException e) {

    }
}
